﻿using RockBus.Composition.Interfaces;
using RockBus.Logging.Interfaces;
using RockBus.Services;
using System;
using System.ServiceModel;
using System.ServiceModel.Activation;

namespace RockBus.Hosting
{
    public class StaticServiceHostFactory : ServiceHostFactory
    {
        public override ServiceHostBase CreateServiceHost(string constructorString, params Uri[] baseAddresses)
        {
            var rsh = new StaticServiceHost<CbrService>(DependencyManager.Instance.Resolve<ILogger>(), baseAddresses);
            return rsh;
        }
    }
}